﻿using Sunny.UI;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace App.Desk.UserControls
{
    public partial class UcStatusButton : UserControl
    {
        public UcStatusButton()
        {
            InitializeComponent();
        }

        public PLCParaModel Parameter { get; set; }

        private void UcStatus_Load(object sender, EventArgs e)
        {
            this.Height = 34;
            this.Padding = new Padding(2, 2, 2, 2);
            this.Margin = new Padding(2, 2, 2, 2);
        }

        public void SetText(string SysName)
        {
            labName.Text = SysName;
        }

        public void SetStyle(UIShape uiShape)
        {
            lightButton.Shape = uiShape;
            lightButton.OnColor = Color.IndianRed;
        }

        public void SetState(UILightState state)
        {
            lightButton.State = state;
        }
    }
}
